home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel Volume 2 #1
/
carousel.iso
/
mactosh
/
util
/
simulare.sit
/
Simula 4.07 Reference
/
card_44156.txt
< prev
next >
Wrap
Text File
|
1989-05-02
|
2KB
|
49 lines
-- card: 44156 from stack: in.07 Reference
-- bmap block id: 0
-- flags: 0000
-- background id: 13647
-- name:
-- part 1 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=13 top=289 right=311 bottom=97
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Utilities
----- HyperTalk script -----
on mouseUp
go to card id 26098
end mouseUp
-- part contents for background part 2
----- text -----
Random drawing - continued
-- part contents for background part 1
----- text -----
integer procedure POISSON(invWait,U); name U; real invWait; integer U;
A sample from the Poisson distribution with the waiting time 1/invWait.
real procedure ERLANG(a,b,U); name U; real a,b; integer U;
A sample from the Erlang distribution with mean 1/a and standard deviation
1/(1*Sqrt(b)).
integer procedure DISCRETE(A,U); name U; real array A; integer U;
A random number K in the range Low..High+1 is returned with probablity
A(K)-A(K-1) [Low..High are the bounds of A; A(Low-1)=0, A(High+1)=1]
real procedure LINEAR(A,B,U); name U; real array A,B; integer U;
A cumulative distribution function F is given by linear interpolation in the non-
equidistant table defined by A and B, such that A(i)=F(B(i)). Conditions: A and B
must have the same length, A(Low)=0, A(High)=1. A(i+1)>=A(i), B(i+1)>B(i).
integer procedure HISTD(A,U); name U; real array A; integer U;
A sample from the distribution where A is a histogram defining the relative
frequencies of the values.